Skip to content

docs: decide desktop runtime packaging - #187

Merged
oratis merged 11 commits into
mainfrom
codex/desktop-runtime-adr
Aug 2, 2026
Merged

docs: decide desktop runtime packaging#187
oratis merged 11 commits into
mainfrom
codex/desktop-runtime-adr

Conversation

@oratis

@oratis oratis commented Aug 1, 2026

Copy link
Copy Markdown
Owner

Summary

  • accept a Tauri-supervised target-specific Node 22 sidecar for the desktop runtime
  • choose single-client JSONL stdio and keep multi-client daemon attachment out of v1
  • add a reproducible no-PATH packaging/handshake probe
  • record size, cold-start, signing, notarization, rollback, and DMG decision gates

Evidence

  • current unsigned Tauri app: 6,733,824 bytes
  • local target-thin runtime: 117,655,968 bytes
  • thin/stripped runtime: 108,412,080 bytes
  • isolated protocol v1 handshake with empty PATH: passed (~1.02s cold)
  • signed/notarized release remains an explicit CI gate; this PR does not claim release credentials were available locally

Validation

  • pnpm spike:desktop-sidecar
  • pnpm docs:check
  • pre-commit format/lint/typecheck/test (925 passed, 12 skipped)
  • local pnpm --filter @deepcode/desktop tauri:build

Stack

Depends on #186.

@oratis
oratis changed the base branch from codex/protocol-runtime to main August 2, 2026 06:36
@oratis
oratis marked this pull request as ready for review August 2, 2026 06:39
@oratis

oratis commented Aug 2, 2026

Copy link
Copy Markdown
Owner Author

Review: approved ✅ — the evidence is what makes this reviewable

An ADR that picks a runtime packaging strategy is normally hard to review because the tradeoff is asserted. Here it's measured, so the decision can actually be checked:

  • current unsigned Tauri app: 6.7 MB
  • target-thin Node runtime: 117.7 MB
  • thin + stripped: 108.4 MB
  • no-PATH protocol v1 handshake: passed, ~1.02 s cold

The size cost is the real decision, and it should be stated plainly: this takes the desktop app from ~6.7 MB to ~115 MB, roughly 17×. That is the price of getting provider credentials and the agent loop out of the WebView, and given threat #1 in security-model.md (credential exfiltration) I agree it's worth paying. But it is a permanent, user-visible download-size regression, not a rounding error — worth being explicit about in release notes so it doesn't read as a regression to users.

What I checked

  • The no-PATH handshake probe is the right test. A sidecar that works only because the developer's PATH happens to have a Node is the classic way this breaks for end users, and it breaks after shipping.
  • Choosing single-client JSONL stdio and explicitly deferring multi-client daemon attachment keeps v1's ownership model simple — one owner, one lock, no cross-client arbitration. Given the session-writer lock work in Sessions: canonical v1 writer and cross-process ownership #185, adding multi-client now would have multiplied the concurrency surface.
  • Signing/notarization/rollback/DMG gates are recorded as explicit gates, and the PR is honest that release credentials were not available locally rather than claiming a verified signed build. That honesty is worth more than a green checkmark.

Validation: CI green; reproducible probe script included.

@oratis
oratis merged commit c5f9c35 into main Aug 2, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant